<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>快速入门升级</title>
</head>
<body>
    <!-- 视图 -->
    <div id="div">
        <div>姓名：{{name}}</div>
        <div>班级：{{classRoom}}</div>
        <button v-on:click="hi()">打招呼</button>
        <button v-on:click="update()">修改班级</button>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>

    new Vue({
        el:"#div",

        data:{
            name:"上海黑马程序员",
            classRoom:"java147期"
        },

        methods:{
            hi(){
                console.log("点我干嘛！！！");
            },

            update(){
                this.classRoom = "上海148"
            }
        }



    })






  

</script>
</html>